package com.kede.ienum;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/***
 ** @Author:Pr.li
 ** @Description:
 ** @Date: create in 2023/5/15 21:44
 ***/
@Getter
@AllArgsConstructor
public enum PayTypeEnum {
    SCORE(0,"德币支付",1),
    MONEY(1,"RMB支付",2),
    MINXI(2,"RMB+德币",3);



    @EnumValue
    private Integer code;
    private String value;
    private Integer enumIndex;



    public static PayTypeEnum parse(Integer code) {
        for (PayTypeEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
